from pyecharts.charts import Line
from pyecharts.options import TitleOpts
from pyecharts.options import LegendOpts
from pyecharts.options import ToolboxOpts
from pyecharts.options import VisualMapOpts

line = Line()

line.add_xaxis(["肯德基", "麦当劳", "德克士"])
line.add_yaxis("popular", [50, 30, 20])

line.set_global_opts(
    title_opts=TitleOpts(title="快餐", pos_left="30%"),
    legend_opts=LegendOpts(is_show=True),
    toolbox_opts=ToolboxOpts(is_show=True)
)

line.render()
